package com.qf.springmvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
@RequestMapping("jump")
public class JumpController {

    @RequestMapping("zhuanfa")
    public String zhuanfa() {

        return "forward:/jump/zhuanfa2";
    }

    @RequestMapping("zhuanfa2")
    public String zhuanfa2() {
        System.out.println("执行第二个方法");

        return "view/index2";
    }


    @RequestMapping("cdx")
    public String cdx() {
        System.out.println("演示重定向");

        return "redirect:http://wwww.baidu.com";
    }


    @RequestMapping("cdx2")
    public String cdx2() {
        System.out.println("演示重定向");

        return "redirect:/hello/test2";
    }
}
